using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication4
{
    public partial class frmIntegrityFix : Form
    {
        public frmIntegrityFix(List<DataRow> removedVillages)
        {
            InitializeComponent();

            foreach (DataRow dr in removedVillages)
            {
                if (dr.Table.ToString() == "Villages")
                {
                    textBox1.Text += "Village ("
                        + dr[World.CONSTS.VillagesTable.Columns.XIndex].ToString()
                        + "," + dr[World.CONSTS.VillagesTable.Columns.YIndex].ToString()
                        + ") - " + dr[World.CONSTS.VillagesTable.Columns.NameIndex].ToString() + Environment.NewLine;
                }
                else if (dr.Table.ToString() == "Tribes")
                {
                    if (dr[World.CONSTS.TribesTable.Columns.NameIndex].ToString() != "")
                    {
                        textBox1.Text += "Tribe ("
                            + dr[World.CONSTS.TribesTable.Columns.NameIndex].ToString() + ")" + Environment.NewLine;
                    }
                    else
                    {
                        if (dr[World.CONSTS.TribesTable.Columns.IDIndex].ToString() != "0")
                        {
                            textBox1.Text += "Tribe ID :" + dr[World.CONSTS.TribesTable.Columns.IDIndex].ToString() + " Removed " + Environment.NewLine;
                        }
                    }
                }
                else if (dr.Table.ToString() == "Players")
                {
                    if (dr[World.CONSTS.PlayersTable.Columns.NameIndex ].ToString() != "")
                    {
                        textBox1.Text += "Player ("
                            + dr[World.CONSTS.PlayersTable.Columns.NameIndex].ToString() + ")" + Environment.NewLine;
                    }
                }


            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}